<include file="public@header"/>

<div class="wrap js-check-wrap">
    <form method="post" class="js-ajax-form" action="/portal/works/reviewPost.html" novalidate="novalidate">
        <table class="table table-hover table-bordered table-list">
            <tbody>
            <tr class='data-item-tr'>
                <td>赛事名称</td>
                <td>{$contest.title}</td>
                <input type="hidden" name="contest_id" id="contest_id" value="{$contest.id}" />
                <input type="hidden" name="review_id" id="review_id" value="{$user.id}" />
            </tr>
            <tr class='data-item-tr'>
                <td>作品标题</td>
                <td>{$work.title}</td>
                <input type="hidden" name="id" id="id" value="{$work.id}" />
            </tr>
            <tr class='data-item-tr'>
                <td>输入分数</td>
                <if condition="empty($score)">
                    <td><input type="number" id="score" value="" name="score" min="0"></td>
                <else/>
                    <td><input type="number" id="score" value="{$score.score}" name="score" min="0"></td>
                </if>

            </tr>
            </tbody>
        </table>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
    function confirm() {
        var contestId   = $('#contest_id').val();
        var workId = $('#id').val();
        var score     = $('#score').val();
        var reviewId     = $('#review_id').val();
        return {
            contest_id: contestId,
            review_id: reviewId,
            work_id: workId,
            score: score
        };
    }
</script>
</body>
</html>